/**
 * jQuery - based
 * deff-browser.bugfix - based
 * Objects - based
 * 
 * @author Bevis.Zhao
 */
(function($){
	
	var configure = function(xpath){
	};

	configure.prototype = {
		baseConfig : function(xpath){
			this.container = $(xpath);
			for(var i = 1; i < arguments.length; i++){
				this.container.add(arguments[i]);
			}
		},
		fixAll : function(){
			for(var f in configure.fn ){
				if(typeof configure.fn[f] === 'function' && /^fix.*/.test(f))
					configure.fn[f].call(this);
			}
		},
		configAll : function(){
			configure.apply(this, arguments);
			for(var f in configure.fn ){
				if(typeof configure.fn[f] === 'function' && !/^_.*/.test(f))
					configure.fn[f].call(this);
			}
		}
	}
	
	configure.fn = {
		// 修正hover
		fixHover : function(){
			DBFixer.fixHover(this.container);
		},
		configTasks : function(){
			var json = taskIntegrator._getCookieTasks() || '[]';
			return taskIntegrator.load(eval('(' + json + ')'));
		},
		configActivityMessage : function(){
			var amesage = $('#activity_message');
			var height = amesage.height();
			var toogleTime = 6000;
			setTimeout(function(){					
				$('#activity_message').animate({height : '-=' + height + 'px' }, '400', function(){
					$('#activity_message').animate({height : '+=' + height + 'px' }, '400');
				});
				setTimeout(arguments.callee, toogleTime);
			}, toogleTime);
		},
		cofnigLogoAnimate : function(){
			
			$('.logo').click(function(){
				$(this).animateTo('.hidden', null, {easing : 'easeOutCirc', duration : 1000});
			});
		}
	}
	window.configure = new configure();
})(jQuery);
